import 'package:kkhousekeep/generated/json/base/json_convert_content.dart';
import 'package:kkhousekeep/models/notice_detail_entity.dart';

NoticeDetailEntity $NoticeDetailEntityFromJson(Map<String, dynamic> json) {
	final NoticeDetailEntity noticeDetailEntity = NoticeDetailEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		noticeDetailEntity.code = code;
	}
	final NoticeDetailObj? obj = jsonConvert.convert<NoticeDetailObj>(json['obj']);
	if (obj != null) {
		noticeDetailEntity.obj = obj;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		noticeDetailEntity.msg = msg;
	}
	return noticeDetailEntity;
}

Map<String, dynamic> $NoticeDetailEntityToJson(NoticeDetailEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['obj'] = entity.obj.toJson();
	data['msg'] = entity.msg;
	return data;
}

NoticeDetailObj $NoticeDetailObjFromJson(Map<String, dynamic> json) {
	final NoticeDetailObj noticeDetailObj = NoticeDetailObj();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		noticeDetailObj.id = id;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		noticeDetailObj.title = title;
	}
	final String? publisher = jsonConvert.convert<String>(json['publisher']);
	if (publisher != null) {
		noticeDetailObj.publisher = publisher;
	}
	final String? context = jsonConvert.convert<String>(json['context']);
	if (context != null) {
		noticeDetailObj.context = context;
	}
	final int? views = jsonConvert.convert<int>(json['views']);
	if (views != null) {
		noticeDetailObj.views = views;
	}
	final String? publishTime = jsonConvert.convert<String>(json['publishTime']);
	if (publishTime != null) {
		noticeDetailObj.publishTime = publishTime;
	}
	final String? createTime = jsonConvert.convert<String>(json['createTime']);
	if (createTime != null) {
		noticeDetailObj.createTime = createTime;
	}
	final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
	if (updateTime != null) {
		noticeDetailObj.updateTime = updateTime;
	}
	final int? cid = jsonConvert.convert<int>(json['cid']);
	if (cid != null) {
		noticeDetailObj.cid = cid;
	}
	final int? read = jsonConvert.convert<int>(json['read']);
	if (read != null) {
		noticeDetailObj.read = read;
	}
	return noticeDetailObj;
}

Map<String, dynamic> $NoticeDetailObjToJson(NoticeDetailObj entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['title'] = entity.title;
	data['publisher'] = entity.publisher;
	data['context'] = entity.context;
	data['views'] = entity.views;
	data['publishTime'] = entity.publishTime;
	data['createTime'] = entity.createTime;
	data['updateTime'] = entity.updateTime;
	data['cid'] = entity.cid;
	data['read'] = entity.read;
	return data;
}